import React, { Component } from 'react';
import { connect } from 'react-redux';

function mapStateToProps(state) {
    return {
       ...state
    };
}

function mapDispatchToProps(dispatch) {
    return {

    };
}

class TicketList extends Component {
    render() {
        return (
            <div>
                {this.props.search_ticket_list && this.props.search_ticket_list.map((v,i)=>{
                    return <div key={i}>
                        <div>{v.title}</div>
                        <div>{v.price} 元</div>
                        <div>{v.stock} 张</div>
                         <div>{v.from} - {v.to}</div>
                    </div>
                })}
            </div>
        );
    }
}

export default connect(
    mapStateToProps,mapDispatchToProps
)(TicketList);